#ifndef __GfxDriver_WGL_WGLRenderedTexture_h__
#define __GfxDriver_WGL_WGLRenderedTexture_h__

#include "GfxDriver/Texture.h"
#include "GfxDriver/WGL/GLInclude.h"

namespace Orca {

	class GfxDriver;

	//--------------------------------------------------------------------------
	class WGLRenderedTexture : public TextureRendered {

	public:
		static WGLRenderedTexture* create(
			 GfxDriver *gfxDriver
			,uint32 w
			,uint32 h
			,PixelFormat format);

		WGLRenderedTexture();

		virtual ~WGLRenderedTexture();

		virtual uint32 getWidth() const;
		virtual uint32 getHeight() const;
		virtual PixelFormat getPixelFormat() const;

		virtual unsigned int getAPIHandle() const;
		virtual unsigned int getAPITexType() const;

		virtual bool uploadToGPU(bool autoGenMipmap);

	private:
		GfxDriver *mGfxDriver;
		uint32 mW, mH;
		PixelFormat mFmt;
		GLuint mGLHandle;

		bool _init(
			 GfxDriver *gfxDriver
			,uint32 w
			,uint32 h
			,PixelFormat format);

	};

}

#endif	// __GfxDriver_WGL_WGLRenderedTexture_h__